/*
* @Author: z.p
* @Project: Zdotp
* @Date: 2024年12月30日
* @Description: actor之间通信的包类型
*/

using Zdotp.ObjectPool;

namespace Zdotp.Actor.Packet;

public class Message : ObjectBase 
{
    public MessageInfo Info;
    public MailObject? Data;
    public Type? DataType;
    public void SetData<T> (T? data) where T : MailObject
    {
        Data = data;
        DataType = data == null ? null : typeof(T);
    }

    public override void OnGet()
    {
        
    }

    public override void OnRelease()
    {
        
    }
}

public class MailObject : ObjectBase
{
    public override void OnGet()
    {
        
    }

    public override void OnRelease()
    {
        
    }
}